<%--
  Created by IntelliJ IDEA.
  User: owner
  Date: 2018-08-08
  Time: 18:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:if test="${empty param.categorycount}">
    <c:set var="categorycount" scope="page" value="100"/>
</c:if>

<c:if test="${!empty param.categorycount}">
    <c:set var="categorycount" scope="page" value="${param.categorycount}"/>
</c:if>

<div class="category_Product">
    <c:forEach items="${products}" var="pro" varStatus="st">
        <c:if test="${st.count<=categorycount}">
        <%--<c:if test="${st.index%4 == 0}">--%>
            <%--<div class="category_Product_list" >--%>
        <%--</c:if>--%>
        <div class="category_Product_item"  id="p${pro.id}">
            <div class="category_Product_border">
                <img src="img/productSingle_middle/${pro.firstProductImage.id}.jpg" alt="product${st.index}"
                     class="category_Product_image">
                <span class="item_price">￥<fmt:formatNumber type="number" value="${pro.promotePrice}"
                                                            minFractionDigits="2"/></span>
                <a href="foreproduct?pid=${pro.id}" class="item_link">
                        ${fn:substring(pro.name,0,20 )}
                </a>
                <a href="foreproduct?pid=${pro.id}" class="item_smallLink">天猫专卖</a>
                <table>
                    <tbody>
                    <tr>
                        <td class="item_mybought">
                            <span>月成交</span>
                            <span class="item_bought">${pro.saleCount}笔</span>
                        </td>
                        <td class="item_mycomment">
                            <span>评价</span>
                            <span class="item_comment">${pro.reviewCount}</span>
                        </td>
                        <td class="item_image">
                            <a href=""><img src="img/site/wangwang.png" alt=""></a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <%--<c:if test="${st.count%3 == 1}">--%>
            <%--</div>--%>
        </c:if>
    </c:forEach>
</div>
<div class="clear"></div>
</div>
